/* testing whether we can get the correct value from
 * the local variable l-value. a correct version
 */

/* result should be:
 *
 * 11 false Oxaddr1 12 0xadd1 true true true true false false false false
 * false false 1 2 3 4 0x0
 *
 * (and there is a \n between each pair of them)
 */

struct A{
  int a;
  int * b;
  struct A *c;
};

/*@*/
void main(){
  int a;
  bool b;
  int * p;
  array[10,bool] c;
  struct A d;


  a = 11;
  print(a);

  b = false;
  printb(b);

  p = alloc(int);
  printp(p);

  *p = 12;
  print(*p);
  printp(p);

  a = 0;
  while (a<10){
    c[a] = a>5;
    a=a+1;
  }
  
  while (a > 0){
    a = a-1;
    printb(c[a]);
  }

  d.a = 1;
  d.b = alloc(int);
  d.c = alloc(struct A);

  *d.b = 2;
  d.c->a = 3;
  d.c->b = alloc(int);
  d.c->c = null;
  *d.c->b = 4;


  print(d.a);
  print(*(d.b));
  print((*(d.c)).a);
  print(*((*(d.c)).b));
  printp(d.c->c);
  return;
}
/*@*/
